package com.chenfan.magic.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @Description:
 * @author: weishili
 * @date: 20/7/12
 * @version: V1.0
 */
@Data
@ApiModel("权限按钮-出参")
public class SPrivilegeButtonRes {

    @ApiModelProperty("上级code，顶级为 -1")
    private String parentCode;

    @ApiModelProperty("权限code")
    private String privilegeCode;

    @ApiModelProperty("权限类型 1：菜单 2 子菜单（页面）3按钮")
    private Integer privilegeType;

    @ApiModelProperty("vue path")
    private String path;

    @ApiModelProperty("redirect")
    private String redirect;

    @ApiModelProperty("组件名称")
    private String component;

    @ApiModelProperty("权限名英文")
    private String name;

    @ApiModelProperty("是否隐藏 0：否 1：是")
    private Integer hidden;

    @ApiModelProperty("中文")
    private String title;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("子菜单")
    private List<SPrivilegeButtonRes> children;

    @ApiModelProperty("按钮集合")
    private List<Buttons> buttons;

    @Data
    public static class Buttons {

        @ApiModelProperty("上级code，顶级为 -1")
        private String parentCode;

        @ApiModelProperty("权限code")
        private String privilegeCode;

        @ApiModelProperty("权限类型 1：菜单 2 子菜单（页面）3按钮")
        private Integer privilegeType;

        @ApiModelProperty("按钮标识 add/search/edit/delete")
        private String btnKey;

        @ApiModelProperty("状态 true,false")
        private Boolean status;

        @ApiModelProperty("中文")
        private String title;

    }

}